PDF to KAP

Lake Travis Example

Contributed by [egodsey] on Cruisers Forum

How to convert a PDF chart so that it can be used with OpenCPN?

This question may have been already been answered elsewhere in the OpenCPN Forum … but I could not find the complete answer in one place, hence this post.

Background: I live (and sail) in the US. Thus getting offshore/coastal charts compatible with OpenCPN is not a problem. But I live (and sail) on Lake Travis (near Austin, TX). Lake Travis (and other inland lakes) are NOT covered by the free NOAA charts. One local government entity, the Lower Colorado River Authority (LCRA), does publish PDFs of charts for several of the lakes on the Lower Colorado River (specifically Lake Travis, Lake LBJ and Lake Buchanan).

LCRA Maps | Highland Lakes

LCRA Maps | Highland Lakes

Charts for these lakes (and other inland lakes in the US) are available for the Navionics Marine & Lakes US iPhone/iPad app. But the Navionics app is not a complete chartplotter, so if I want to get some on the water time with a real chartplotter then I needed to figure out how to use these LCRA PDFs with OpenCPN.

The OpenCPN User Manual (OpenCPN User Manual | Official OpenCPN Homepage) and the list Supplementary Software (Supplementary Software | Official OpenCPN Homepage) are very complete. Study of these two documents convinced me that if I was willing to use a DOS command line interface or to use Linux then all of the conversion tools I needed were available. But since I had not done any serious software integration in over 20 years this really wasn't a live option. For the most part I am content to live as a Windows user … thus I was looking for a Windows solution. I suspect that for every sailor that is comfortable with Linux and/or a DOS command line interface there are 1,000 (or even 10,000) who are Windows users.

Lake Travis West Lake Travis East

With that background, here is the answer to the question: How can I convert a PDF chart so that I can use it with OpenCPN?

It is a five step process:

  1. Convert the PDF to a BMP file
  2. Convert the BMP to a calibrated WCI file
  3. Convert the WCI file to calibrated BMP file
  4. Convert the calibrated BMP to a KAP file
  5. Install the KAP file into OpenCPN

1. Convert the PDF to a BMP file

I suspect there are several Windows programs (and probably some on-line services) available to do this conversion. I happen to have Adobe Photoshop Elements 4.0 so that is what I used. One key thing here is to correctly specify the resolution of the output (BMP) file. On Elements 4.0 this is done at the start, on the “Import PDF” screen. And my setup defaults to 72dpi (screen resolution) so I had to specifically set the “Resolution” to something more appropriate. I used 300dpi.

Obviously this does NOT improve the accuracy of the resulting chart, but it does it make for a “cleaner” screen when viewing the chart under OpenCPN. NOTE: All of the warnings about “over zooming” still apply … and even if the OpenCPN “OverZoom” warning is NOT visible in the upper left-hand of the screen … you might still be over zoomed. Chart accuracy is a function of the accuracy of the original PDF chart and the care/accuracy of your calibration. Consider yourself warned.

Also, be advised that the PDF to BMP conversion can be a lengthy process. On my desktop machine it took several minutes for Elements 4.0 to convert each PDF chart. I suspect the process might get rather unwieldy on an underpowered laptop without much memory.

2. Convert the BMP to a calibrated WCI file

Apparently the standard Windows calibration program is MapCal_2.exe that was originally developed for SeaClear. It can be readily downloaded … do a simple Google search.

Use of MapCal_2.exe is fairly straightforward … but here are some hints that might save you some time: - Use “File” “Open Image” to load the .BMP file you created in Step. 1. - Then use “Edit” “Chart Information” to enter a “Chart Name” … to select a “Projection:” type and to enter a “Scale: 1/”. Example: Many small area maps/charts in the US (USGS topo maps for example) are “Mercator” projections with a Scale of 1:24,000. - Then click on the “Cal” tab. Position the cross-hair over a known location … click the right mouse button … select “Add New Cal. Point” … enter the Lat/long of the point … then repeat for second point in the opposite corner. - Then click the “Lock Lat & Long” box … and select “File” “Save Calibration”. - Then select “Tools” “Convert” “Current to WCI”. Pay attention to the file name and location of the output calibrated WCI file.

3. Convert the WCI file to calibrated BMP file

While still in MapCal_2.exe use it to convert the calibrated WCI file to a calibrated BMP file. - Use “File” Open Image“ to load the calibrated WCI file you created in Step 2. - Then select “Tools” “Convert” “Current WCI to BMP”. As before, pay attention to the file name and location of the output calibrated WCI file.

4. Convert the calibrated BMP to a KAP file

Fortunately for me Mr. Erik Holewijn has written a Windows program (HelpCal.exe) that uses the conversion tools mentioned in the list of OpenCPN Supplementary Software. To use it you will need to download both HelpCal.exe and the tools: mc2bsbh.exe, nconvert.exe and tifbsb.exe. Here is that thread: Convert TIFF Image into Map KAP

HelpCal.exe is very straightforward. The output is a KAP file that OpenCPN can use directly.

5. Install the KAP file into OpenCPN

The instructions for loading charts into OpenCPN are also rather straightforward, but here are the basics: - In OpenCPN select the “Options Menu” … that's the “wrench” icon. - Select “Charts” at the top of the page - Click on “Add Directory” … then select the Directory of the new KAP file you created in Step 4. - Then select appropriate “Update Control” at the bottom of the page.

So there you have it. At this juncture the charts that started out as PDFs should now be visible on OpenCPN.

Lake Travis is on two KAP files which I am happy to share with you.

Converting Images using Weatherfax

Suggestions by [houlejm] Jean-Marie

An easy way of converting images to kap is using the weatherfax plugin. In the case of pdf images:

  1. Extract and save them in a supported format (gif, png tiff) with your preferred image editor.
  2. Open them in O with the weatherfax plugin.
  3. Calibrate them.
  4. Export them.

I use that to add patches to RNC charts